<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<header class="am-topbar admin-header">
  <div class="am-topbar-brand">
   <a href="${pageContext.request.contextPath}/dashboard"> <strong>易学</strong> <small>在线作业系统</small></a>
  </div>
  <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
  <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
    <ul class="am-nav am-nav-pills am-topbar-nav">
       	<c:if test="${user.getRole().getRid()==1}">
        <li class=""><a href="/WorkSystem/dashboard">首页</a></li>
        <li><a href="/WorkSystem/manage/task/tasklist">任务管理</a></li>
        <li><a href="/WorkSystem/manage/test/testlist">试卷管理</a></li>
        <li><a href="/WorkSystem/manage/student">学生管理</a></li>
        </c:if>
        <c:if test="${user.getRole().getRid()==2}">
        <li><a href="/WorkSystem/dashboard">首页</a></li>
        <li><a href="/WorkSystem/test/mygrade">我的考试</a></li>
        </c:if>
    </ul>
    <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
      <li class="am-dropdown" data-am-dropdown="">
        <a class="am-dropdown-toggle" data-am-dropdown-toggle="" href="javascript:;">
          <span class="am-icon-users"></span>${user.name} <span class="am-icon-caret-down"></span>
        </a>
        <ul class="am-dropdown-content">
          <li><a href="${pageContext.request.contextPath}/user/profile"><span class="am-icon-user"></span> 资料</a></li>
          <li><a href="${pageContext.request.contextPath}/user/logout"><span class="am-icon-power-off"></span> 退出</a></li>
        </ul>
      </li>
      <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen"><span class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a></li>
    </ul>
  </div>
</header>